package com.stone.design.patterns.state;

/**
 * @author Stone
 * @version V1.0
 * @description:
 * @date 4/25/18 22:05
 * @email redsstone@163.com
 */
public class NoQuarterState implements State{

    GumballMachine mGumballMachine;

    public NoQuarterState(GumballMachine gumballMachine) {
        mGumballMachine = gumballMachine;
    }

    @Override
    public void insertQuarter() {
        System.out.println("you insert quarter");
        mGumballMachine.setState(mGumballMachine.getHasQuarterState());

    }

    @Override
    public void ejectQuarter() {
        System.out.println("no quarter");
    }

    @Override
    public void tumCrank() {
        System.out.println("you need insert quarter");
    }

    @Override
    public void dispense() {
        System.out.println("you need insert quarter");

    }
}
